package com.cls.business.mapper;

import com.cls.business.entity.DelayApply;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 延期申请表 Mapper
 *
 * @author slx
 * @date 2020-12-02 14:26:56
 */
@Repository
public interface DelayApplyMapper extends BaseMapper<DelayApply> {
    @Select("select * from biz_delay_apply where declare_id = #{declareId} and is_delete=0 ORDER BY create_time DESC limit 1")
    DelayApply findDelayApplyByDeclareId(@Param("declareId")Long declareId);
    @Select("select * from biz_delay_apply where declare_id = #{declareId}  ORDER BY create_time DESC")
    List<DelayApply> selectAll(@Param("declareId")Long declareId);
}
